<?php
/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
require('config.php');

class database
{
    static function connect()
    {
        require('config.php');
        $conn=mysql_connect($mysqlhost,$mysqluser,$mysqlpass);
        if(!$conn)
        {
                die('Gagal tersambung dengan MySQL\n.Error status : '.mysql_error());
        }
        $mysqlconn=$conn;
        return $conn;
    }

    static function query($query)
    {
        require('config.php');
        $conn=database::connect();
        mysql_select_db($mysqldb,$conn);
        $res=mysql_query($query);
        return $res;
    }

}
?>